package com.kasax.httpsupport;

import java.io.UnsupportedEncodingException;

public class ResponseBody {
    byte[] bytes;

    public ResponseBody(byte[] bytes) {
        this.bytes = bytes;
    }

    public byte[] getBytes() {
        return bytes;
    }

    public String string() {
        try {
            return new String(getBytes(), Const.UTF8);
        } catch (UnsupportedEncodingException e) {
            e.printStackTrace();
        }
        return "";
    }
}
